package test.diverse;

// public abstract class WindCalculator {     
// giver fejlen :
// "The public type WindCalculator must be defined in its own file"

abstract class WindCalculator {
	public static void main ( String[ ] args ) {
		// Example : METAR Wind after danish regulations
		WindCalculator calculator = new METARWindCalculator() ;
		int[] values = new int[] { 230 , 7 , 245 , 8 , 234 , 7} ; // fake-it
		String METAR =
				calculator.calculateFormatted10MinWind ( values ,
						WindCalculator.DANISH ) ;
	}

	public String calculateFormatted10MinWind ( int[] datavalues ,
			int algorithmType ) {
		int meanSpeed = 7 , meanDirection = 234 ; 
		boolean vrb = false ; // { a k e􀀀i t
		switch ( algorithmType ) {
		case DANISH:
			// Calculate means speed ....... (omitted)
			break ;
		case FRENCH: /* omitted */ break;
		case GERMAN: /* omitted */ break;
		}
		return format (meanSpeed , meanDirection , vrb ) ;
	}
	public abstract String format ( int s , int d , boolean vrb ) ;

	// contants
	public static final int DANISH = 100 ;
	public static final int FRENCH = 101 ;
	public static final int GERMAN = 102 ;
}


class METARWindCalculator extends WindCalculator {
	public String format ( int s , int d , boolean vrb ) {
		String result = "23407" ; // fake-it
		return result ;
	}
}